perm filename WJ[XX,LCS] blob sn#369215 filedate 1978-07-21 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	< VIBFM - This instrument is a simple FM type with independent attack and decay
C00007 ENDMK
C⊗;
< VIBFM - This instrument is a simple FM type with independent attack and decay
<controls on the envelopes, vibrato, and a point source location capability in 
<angle and distance;

< Parameters:
<P1	P2	P3	P4	P5	P6	P7	P8	P9	P10
<Beg    Dur    Freq     Amp    AmpFun   AtPt   AtDur    DcPt    DcDur    Deg

<P11	P12	P13	P14	P15	P16	P17	P18
<Dis    PcRev  ModRatio IndxFun Indx0   Indx1	VibPc	VibRate

PRECEDE;
FUNC ABC[222,WJ];
INST VIBFM INSA INSB INSC INSD INSE INSF INSG INSH,
     INSI INSJ INSK INSL INSM INSN INSO INSP;

< ⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗ New Reverberation ⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗

< Remaining statements up to the asterisk pertain only to the reverberator:

INST REVMOD r1;	  < Elementary allpass/comb-filter/delay-line instr. in SAMINS.
variable tmpRev1, tmpRev2, tmpRev3, revOut; < Reverberator interconnection names.

PLAY;
< The reverb input is REVIN (scaled by PcRev) which is pre-declared in MBOX.
< If it were not pre-declared, it would be treated exactly like tmprev1,tmprev2,etc.
tmpRev1←mod_sum;
tmpRev2←mod_sum;
tmpRev3←mod_sum;   < Allocate modifier sum memory to store signals between 
revOut←mod_sum;	   < elementary reverberator sections (ie allocate "patching" plugs).

< Example call:		      (seconds)   (samples)           ( < 1 ) 
< instrument_name  begin_time  duration  samples_delay  Gain1  Gain2  input  output;

<   To make an allpass, set Gain2 ← -Gain1 ← G.	(G is .7 in the 3 allpass's below).
<   To make a comb filter, set Gain1 to zero.
<   To make a pure delay line, set Gain1 ← Gain2 ← 0;

< The reverberator below lasts for 32 seconds (duration), READ REVED.KS[DOC,MUS] for
< how to design the allpass sections efficiently (first 3 sections below).

r1 0 32 1051,-.7 .7 revIn tmpRev1;
r1 0 32 337,-.7 .7 tmpRev1 tmpRev2;	< Three ALLPASS sections in series.
r1 0 32 113,-.7 .7 tmpRev2 tmpRev3;	< Allpass's are colorless reverberators.

r1 0 32 4799,0 .842 tmpRev3 revOut;
r1 0 32 4999,0 .833 tmpRev3 revOut;	< Four COMB-FILTERS in parallel.
r1 0 32 5399,0 .815 tmpRev3 revOut;	< These reverb sections give a ripply 
r1 0 32 5801,0 .797 tmpRev3 revOut;	< magnitude frequency response.

r1 0 32 1697,.000 0 revOut outma;
r1 0 32 2051,.000 0 revOut outmb;	< Four DELAY-LINES in parallel;
r1 0 32 1499,.000 0 revOut outmc;	< These are used to delay the onset
r1 0 32 2001,.000 0 revOut outmd;	< of reverberation with respect to the
					< direct signal. They do NOT give reverb.

< ⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗ Now SCORE input begins ⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗⊗
*				
INSA ;
P2 2;
P3 440;
P4 .95;
P5 F1;
P10 90     ;
P11 1;
P13 1; 
P14 F1;
P17 NU/.02/.2/1X9 /FINE;
P18 NU/7X3/16/32/64/128/440/880/1320/1760;
END;

RUN;